#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "fun.h"

int main() {
	int choice = 7;
    va a[CAPACITY];  
    war b[CAPACITY]; 
    P c[CAPACITY]; 
    int n = 0;    
    int zong = 0;  

    readFile(a, b, c, &n, &zong);

    while (1) {
        system("cls");
        switch (choice) {
            case 1:
                menu1(a, b, c, &n,&zong);  
                choice = 7;
                break;

            case 2:
                menu2(a, b, c, &n);  
                choice = 7;
                break;

            case 0:
                printf("退出系统!\n");
                writeFile(a, b, c, n, zong); 
                exit(0);
                break;

            case 7:
                menu();
                scanf("%d", &choice);
                getchar();
                break;

            default:
                printf("选择无效，请重新选择。\n");
                system("pause");
                choice = 7;
        }
    }
    return 0;
}


  
  
  
  
  
  
  